<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <title>Document</title>
</head>

<body>
    <div id="app">
        <button @click="flag=1">音乐</button>
        <button @click="flag=2">新闻</button>
        <button @click="flag=3">娱乐</button>
        <h1 v-if="flag===1">这是音乐列表</h1>
        <h1 v-else-if="flag===2">这是新闻列表</h1>
        <h1 v-else="flag===3">这是娱乐列表</h1>
    </div>
    <script>
        const vm = new Vue({
            data(){
                return{
                  flag:1
                }
            },
            methods:{
                
            }
        }).$mount("#app")
    </script>
</body>

</html>